import upload from '@/utils/upload'
import request from '@/utils/request'

// 创建ERP 一级库台账
export function createPriAccount(data) {
  return request({
    url: '/erp/pri-account/create',
    method: 'post',
    data: data
  })
}

// 更新ERP 一级库台账
export function updatePriAccount(data) {
  return request({
    url: '/erp/pri-account/update',
    method: 'put',
    data: data
  })
}

// 删除ERP 一级库台账
export function deletePriAccount(id) {
  return request({
    url: '/erp/pri-account/delete?id=' + id,
    method: 'delete'
  })
}

// 获得ERP 一级库台账
export function getPriAccount(id) {
  return request({
    url: '/erp/pri-account/get?id=' + id,
    method: 'get'
  })
}

// 获得ERP 一级库台账分页
export function getPriAccountPage(params) {
  return request({
    url: '/erp/pri-account/page',
    method: 'get',
    params
  })
}
// 导出ERP 一级库台账 Excel
export function exportPriAccountExcel(params) {
  return request({
    url: '/erp/pri-account/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
